#!/usr/bin/env python
# encoding: utf-8
import gevent


def foo():
    print "running in foo"
    gevent.sleep(0)
    print "explict context switch to foo again"


def bar():
    print "explict context to bar"
    gevent.sleep(0)
    print "implict context switch back to bar"

f = gevent.spawn(foo)
b = gevent.spawn(bar)

gevent.sleep(0)
